home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / Carrion Feast / cf.dba next >
Encoding:
Text File  |  2001-01-19  |  44.9 KB  |  2,256 lines

  1.  
  2. rem ******** Carrion Feast v0.00011b ******** 
  3. rem ***JOBWARE***
  4.  
  5. rem Im a jack of all trades, master of none, 
  6. rem Im looking for work in the industry, in whatever capacity,
  7. rem I even make a mean cup of tea, so if you see raw potential, 
  8. rem and you have some junior positions knocking about,
  9. rem then drop me a line at m_h9@excite.com
  10.  
  11. rem This took me about 3 months to create, in case you wondering
  12.  
  13. rem I can also do titles sequences and sfx for film and tv
  14. rem checkout www.indyfilms.co.uk
  15.  
  16. rem Ok, thats me pennys worth, now on to the bit where you
  17. rem checkout my mad code, and say to yourself, whats this guy on!
  18. rem
  19. rem laterz... m_h9@excite.com
  20. rem
  21. rem
  22. rem p.s. If your a record producer or you know one, then check out
  23. rem the whole of the title song by FOAM in the sounds directory
  24. rem name "lofoam.wav"       ;)
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. rem setup screen, lose the mouse
  39.  
  40.  
  41. autocam off
  42. set display mode 640,480,16
  43. set camera view 0,40,640,440
  44. hide mouse
  45. backdrop off
  46. sync on
  47. sync rate 30
  48. set ambient light 33
  49.  
  50. rem load music and speech
  51.  
  52. load sound "sounds/lofoam.wav",88
  53. load sound "sounds/2013.wav",100
  54. load sound "sounds/itsbeen.wav",101
  55. load sound "sounds/thefourth.wav",102
  56. load sound "sounds/basic.wav",103
  57. load sound "sounds/anarchy.wav",104
  58. load sound "sounds/thendis.wav",105
  59. load sound "sounds/tillfinally.wav",106
  60. load sound "sounds/itsthe.wav",107
  61. load sound "sounds/amithe.wav",108
  62. load sound "sounds/drivin.wav",109
  63. load sound "sounds/into.wav",110
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rem setup intro objects and textures
  71.  
  72. make object plain 1,180,120
  73. make object plain 2,4000,4000
  74. make object plain 3,20,20
  75. make object plain 4,20,20
  76. make object plain 5,20,20
  77. make object plain 6,20,20
  78. load object "lev1/road.3ds",50
  79. scale object 50,500,500,500
  80. ghost object on 3
  81. ghost object on 4
  82. ghost object on 5
  83. ghost object on 6
  84.  
  85. fog color rgb(0,0,0)
  86. fog distance 1500
  87. fog on
  88. for f=1 to 9
  89. load image "decals/wiper000"+str$(f)+".bmp",f
  90. next f
  91. for f=10 to 99
  92. load image "decals/wiper00"+str$(f)+".bmp",f
  93. next f
  94. for f=1 to 7
  95. load image "decals/rain000"+str$(f)+".bmp",99+f
  96. next f
  97.  
  98.  
  99. rem more sounds
  100.  
  101. load sound "sounds/monsoon1.wav",1
  102. load sound "sounds/monsoon1.wav",2
  103. load sound "sounds/wiper1.wav",3
  104. load sound "sounds/careng.wav",4
  105. clone sound 5,4
  106. set sound volume 1,80
  107. set sound volume 2,80
  108. set sound volume 3,85
  109. set sound volume 4,80
  110. set sound volume 5,80
  111.  
  112. position object 1,500,0,500
  113. position object 2,500,0,2000
  114. color object 2,rgb(0,0,0)
  115. hide object 50
  116. hide object 1
  117. ghost object on 1
  118. texture object 1,1
  119. position camera 500,0,400
  120. point camera 500,0,500
  121.  
  122. load image "sys/logo.bmp",200
  123. load image "sys/foamage.bmp",201
  124. load image "sys/mjh.bmp",202
  125. load image "sys/hero.bmp",203
  126.  
  127.  
  128. make object plain 40,320,240
  129. make object plain 41,150,300
  130.  
  131. set object 40,1,1,1,1,0,0,0
  132. set object 41,1,1,0,1,1,1,1
  133.  
  134. play sound 88
  135. wait 5500
  136. position object 40,500,0,800
  137. position object 41,500,-100,2200
  138. texture object 40,200
  139. texture object 41,203
  140.  
  141.  
  142. for f=1 to 255 step 8
  143. set gamma f,f,f
  144. sync
  145. next f
  146. wait 6000
  147. for f=255 to 0 step -8
  148. set gamma f,f,f
  149. sync
  150. next f
  151.  
  152.  
  153.  
  154. texture object 40,201
  155. for f=1 to 255 step 8
  156. set gamma f,f,f
  157. sync
  158. next f
  159. wait 6000
  160. for f=255 to 0 step -8
  161. set gamma f,f,f
  162. sync
  163. next f
  164.  
  165.  
  166. scale object 40,200,200,200
  167. texture object 40,202
  168. for f=1 to 255 step 8
  169. set gamma f,f,f
  170. sync
  171. next f
  172. wait 6000
  173. for f=255 to 0 step -8
  174. set gamma f,f,f
  175. sync
  176. next f
  177.  
  178. hide object 40
  179. position object 40,10000,10000,10000
  180. sync
  181.  
  182.  
  183.  
  184.  
  185.  
  186. show object 50
  187. show object 1
  188. loop sound 4
  189. play sound 3
  190. play sound 4
  191. set sound speed 3,9000
  192.  
  193. set sound volume 88,90
  194.  
  195.  
  196.  
  197. do
  198.  
  199. talk=talk+10
  200.  
  201.  
  202. if gam>240 and gam<255 then play sound 2
  203.  
  204. gam=gam+8
  205. if gam>255 then gam=255
  206. set gamma gam,gam,gam
  207.  
  208. rot=rot-16
  209. if rot<0 then rot=360
  210. xrotate object 50,rot
  211.  
  212.  
  213. show object 1
  214. inc st
  215. if st>99 then st=1:play sound 3:play sound 5
  216.  
  217. if sound playing(1)=0 then play sound 1:set sound speed 1,20000+rnd(1000)
  218. if sound playing(2)=0 then play sound 2:set sound speed 2,20000+rnd(1000)
  219. if sound playing(4)=0 then play sound 4
  220.  
  221. rem rain
  222. position object 50,1700+rnd(1),-850+rnd(2),1800
  223.  
  224. texture object 1,st
  225. position object 1,499+rnd(1),0,499+rnd(1)
  226. position object 3,400+rnd(200),-75+rnd(150),550
  227. position object 4,400+rnd(200),-75+rnd(150),550
  228. position object 5,400+rnd(200),-75+rnd(150),550
  229. position object 6,400+rnd(200),-75+rnd(150),550
  230.  
  231.  
  232. texture object 4,99+rnd(7)
  233. texture object 3,99+rnd(7)
  234.  
  235. texture object 5,99+rnd(7)
  236. texture object 6,99+rnd(7)
  237.  
  238.  
  239. set cursor 0,450
  240.  
  241. if talk=1000 then ink 128,0:Print "2013, The true Millennium...":play sound 100
  242. if talk=2000 then ink 128,0:Print "Its been two years since the darkness fell.":play sound 101
  243. if talk=3000 then ink 128,0:Print "The Fourth Kingdom some called it.":play sound 102
  244.  
  245. if talk=4000 then ink 128,0:Print "Basic civil structure had collapsed after only 6 months":play sound 103
  246. if talk=5000 then ink 128,0:Print "Anarchy reigned.":play sound 104
  247. if talk=5700 then ink 128,0:Print "Then disease...":play sound 105
  248. if talk=7000 then ink 128,0:Print "Until finally the silence.":play sound 106
  249.  
  250. if talk=8000 then ink 128,0:Print "its the silence that scares me the most.":play sound 107
  251.  
  252. if talk=9000 then ink 128,0:Print "Am i the only one left?":play sound 108
  253. if talk=9700 then ink 128,0:Print "Driving down the last road.":play sound 109
  254. if talk=10400 then ink 128,0:Print "Into the darkness...":play sound 110
  255.  
  256.  
  257.  
  258.  
  259. if talk=1900 then ink 0,0:Print "2013, The true Millennium..."
  260. if talk=2900 then ink 0,0:Print "Its been two years since the darkness fell."
  261. if talk=3900 then ink 0,0:Print "The Fourth Kingdom some called it."
  262.  
  263. if talk=4900 then ink 0,0:Print "Basic civil structure had collapsed after only 6 months"
  264. if talk=5600 then ink 0,0:Print "Anarchy reigned."
  265. if talk=6900 then ink 0,0:Print "Then disease..."
  266. if talk=7900 then ink 0,0:Print "Until finally the silence."
  267.  
  268. if talk=8900 then ink 0,0:Print "its the silence that scares me the most."
  269.  
  270. if talk=9600 then ink 0,0:Print "Am i the only one left?"
  271. if talk=10300 then ink 0,0:Print "Driving down the last road."
  272. if talk=11900 then ink 0,0:Print "Into the darkness...":set sound volume 88,99
  273.  
  274. if talk>13000 then ghost object on 41:move object 41,-50
  275. if talk>13350 then goto nextbit
  276.  
  277.  
  278. sync
  279. loop
  280.  
  281.  
  282.  
  283.  
  284.  
  285. nextbit:
  286. fog color rgb(255,255,255)
  287. fog distance 1
  288. sync
  289. fog off
  290. sync
  291. cls
  292. for f=1 to 6:delete object f:next f
  293. delete object 50
  294. delete object 40
  295. delete object 41
  296.  
  297.  
  298. delete sound 88
  299. for f=100 to 110 :delete sound f:next f
  300.  
  301. skipintro:
  302.  
  303. rem setup for title screen
  304.  
  305. set display mode 640,480,16
  306. set camera view 0,40,640,440
  307. if matrix exist(1)=1 then delete matrix 1
  308.  
  309. dim plpathx(100)
  310. dim plpathy(100)
  311. dim plpathz(100)
  312.  
  313. load sound "sounds/dae.wav",1
  314. play sound 1
  315. sync rate 30
  316. sync on
  317. autocam off
  318. hide mouse
  319. position camera 0,50000,0
  320. point camera 0,50000,0
  321. backdrop on
  322. backdrop off
  323.  
  324.  
  325. sync
  326. set ambient light 10
  327.  
  328. make light 1
  329. make light 2
  330. make light 3
  331. set point light 3,27400,5000,6200
  332. color light 3,rgb(128,0,0)
  333. color light 2,rgb(128,128,0)
  334. set point light 2,8600,1000,6000
  335. set spot light 1,45,90
  336. hide light 0
  337. hide light 1
  338. hide light 2
  339. rem goto skiptit
  340. load object "sys/carrion.3ds",1
  341. load object "sys/feast.3ds",2
  342.  
  343. load sound "sounds/nel1.wav",2
  344. load image "sys/uglytits.bmp",1
  345. make object plain 3,1500,1000:hide object 3
  346. texture object 3,1
  347.  
  348. xrotate object 1,wrapvalue(-90)
  349. xrotate object 2,wrapvalue(-90)
  350. fix object pivot  1
  351. fix object pivot  2
  352.  
  353. position object 1,0,30,-800
  354. position object 2,0,-50,-800
  355. position object 3,0,0,300
  356.  
  357.  
  358. position camera 0,0,-200
  359. point camera 0,0,0
  360.  
  361. cls:sync
  362.  for f=1 to 15
  363.  move object 1,64
  364.  move object 2,64
  365.  sync
  366.  next f
  367. show object 3
  368. play sound 2
  369. for f=1 to 6
  370. position camera 0,0,-200+rnd(10)
  371. point camera 0,0+rnd(10),0
  372. set ambient light 50+rnd(50)
  373.  
  374. sync
  375. next f
  376.  
  377. set ambient light 2
  378. ink rgb(255,255,255),0
  379.  
  380.  
  381.  set text font "papyrus"
  382.  set text size 24
  383.  
  384. do
  385. draw to front
  386.  
  387. ink rgb(200,0,0),0
  388. text 15,575,"Vers 0.1a:  Copyright 2001:  A Dark Menace Production. "
  389. ink rgb(128,0,0),0
  390. text 13,573,"Vers 0.1a:  Copyright 2001:  A Dark Menace Production."
  391.  
  392. inc br
  393.  
  394. rem title flicker
  395.  
  396. set ambient light 33+rnd(10)
  397. if spacekey() then goto beginin
  398. zrotate object 3,wrapvalue(br)
  399. sync
  400. loop
  401.  
  402. beginin:
  403. delete object 1
  404. delete object 2
  405. delete object 3
  406.  
  407. play sound 2
  408. delete sound 1
  409. skiptit:
  410. position camera 0,50000,0
  411. point camera 0,50000,0
  412. cls
  413.  
  414. rem show milton page while the rest loads
  415.  
  416. load image "sys/loadin.bmp",2222
  417. make object plain 2222,48,48
  418. lock object on 2222
  419. texture object 2222,2222
  420. set object 2222,1,1,1,0,0,1,1
  421. position object 2222,0,0,40
  422. wait 30
  423. for f=1 to 24:sync:next f
  424.  
  425.  
  426. load object "sys/playtop1.3ds",5
  427. scale object 5,90,90,90
  428. load object "sys/playtop2.3ds",50
  429.  
  430.  
  431.  
  432.  
  433. load object "sys/flak.3ds",2
  434.  
  435. load object "lev1/lev1.x",99
  436.  
  437. load object "lev1\fcamerar.3ds",333
  438. load object "sys/demontel.3ds",444
  439. load object "sys/demon.3ds",445
  440. for a=0 to 8
  441. load image "decals/hel000"+str$(a)+".bmp",444+a
  442. next a
  443. scale object 333,150,150,150
  444. load object "lev1/light.3ds",128:ghost object on 128
  445.  
  446. yrotate object 128,180
  447. fix object pivot 128
  448.  
  449. rem demonteleport stuff
  450. texture object 444,444
  451.  
  452. ex=45900:ey=46100
  453. position object 444,6000,0,6000
  454. scale object 444,300,200,300
  455. play object 444:loop object 444
  456. ghost object on 444
  457. fade object 444,1
  458. set object speed 444,50
  459.  
  460. set object speed 445,24
  461. position object 445,ex,10,ey
  462. yrotate object 445,180
  463. fix object pivot 445
  464. rem position light
  465.  
  466.  
  467. load object "lev1/light.3ds",129:ghost object on 129
  468.  
  469. yrotate object 129,180
  470. fix object pivot 129
  471. rem position light
  472.  
  473. set object 128,1,1,1,0,0,0,1
  474. set object 129,1,1,1,0,0,0,1
  475.  
  476. rem hud clock
  477. load image "lev1/ttc2.bmp",6500
  478. for f=0 to 9
  479. load image "lev1/"+str$(f)+".bmp",60000+f
  480. next f
  481. load image "lev1/colon.bmp",60010
  482.  
  483.  
  484.  
  485. for f=6000 to 6005:
  486. make object plain f,12,12
  487. next f
  488.  
  489. rem no. pos
  490. position object 6001,-26.3,16,40
  491. scale object 6001,9,20,10
  492.  
  493. position object 6002,-25,16,40
  494. scale object 6002,9,20,10
  495.  
  496. position object 6003,-24,16,40
  497. scale object 6003,9,20,10
  498.  
  499. position object 6004,-23,16,40
  500. scale object 6004,9,20,10
  501.  
  502. position object 6005,-21.7,16,40
  503. scale object 6005,9,20,10
  504.  
  505. rem watch
  506.  
  507. position object 6000,-24,16,40
  508. texture object 6000,6500
  509.  
  510. rem texture clock
  511. texture object 6001,60000
  512. texture object 6002,60000
  513. texture object 6003,60010
  514. texture object 6004,60000
  515. texture object 6005,60000
  516.  
  517.  
  518.  
  519.  
  520.  
  521. for f=6000 to 6005
  522. set object f,1,1,1,0,0,1,1
  523. lock object on f
  524. ghost object on f
  525. fade object f,0
  526. hide object f
  527. next f
  528.  
  529. rem weapon select hud
  530. make object plain 6010,4,2
  531. make object plain 6006,6,3
  532. rem *icon textures*
  533.  
  534. load image "sys/sticki.bmp",60050
  535. load image "sys/ak47i.bmp",60051
  536. load image "sys/seali.bmp",210
  537.  
  538.  
  539.  
  540.  
  541. position object 6006,0,-18,40
  542. texture object 6006,60050
  543. set object 6006,1,1,1,0,0,1,1
  544. lock object on 6006
  545. ghost object on 6006
  546.  
  547. hide object 6006
  548.  
  549.  
  550. position object 6010,25,-19,40
  551. texture object 6010,210
  552. set object 6010,1,1,1,0,0,1,1
  553. lock object on 6010
  554. ghost object on 6010
  555. hide object 6010
  556. rem Seal stuff
  557.  
  558. load object "sys/seal.3ds",6011
  559. scale object 6011,200,200,200
  560. yrotate object 6011,90
  561. position object 6011,26000,1000,6000
  562.  
  563.  
  564.  
  565. load object "sys/seal2.3ds",6012
  566. scale object 6012,200,200,200
  567.  
  568. position object 6012,26000,1000,6000
  569. ghost object on 6012
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582. rem video hud
  583.  
  584. make object plain 6100,20,20
  585. for f=0 to 9
  586. load image "sys/vid000"+str$(f)+".bmp",60100+f
  587. next f
  588. vsp#=44
  589. position object 6100,44,17,40
  590. texture object 6100,60100
  591. set object 6100,1,1,1,0,0,1,1
  592. lock object on 6100
  593. ghost object on 6100
  594.  
  595.  
  596. make object plain 6101,8,7
  597. for f=0 to 9
  598. load image "sys/ben000"+str$(f)+".bmp",60200+f
  599. next f
  600. position object 6101,23,17,40
  601. texture object 6101,60200
  602. set object 6101,1,1,1,0,0,1,1
  603. lock object on 6101
  604. ghost object on 6101
  605. hide object 6101
  606.  
  607.  
  608.  
  609.  
  610. rem more sounds
  611. load sound "sounds/demonfoot.wav",100
  612. load sound "sounds/deded.wav",101
  613. load sound "sounds/ow.wav",102
  614. load sound "sounds/benintro.wav",104
  615.  
  616.  
  617.  
  618. rem sample golum
  619. rem make object plain 1888,1000,1000
  620. rem position object 1888,5000,450,8000
  621.  
  622. rem load image "decals/ghoul01.bmp",45001
  623.  
  624. rem texture object 1888,45001
  625.  
  626. rem set object 1888,1,1,1,0,0,1,1
  627.  
  628. rem texture object 1888,45001
  629.  
  630. rem ghost object on 1888
  631.  
  632.  
  633.  
  634. rem position lensflares
  635.  
  636. position object 128,8610,620,4630
  637. scale object 128,1000,1000,1000
  638.  
  639. position object 129,8615,620,6965
  640. scale object 129,1000,1000,1000
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649. position object 99,7500,0,7500
  650.  
  651. rem speed up the level
  652.  
  653. make static object 99
  654. delete object 99
  655.  
  656.  
  657. ghost object on 2
  658. set object speed 5,64
  659. set object speed 50,64
  660.  
  661. make object sphere 1,160
  662.  
  663.  
  664.  
  665.  
  666. make object sphere 6,60
  667. make object sphere 999,10
  668. make object sphere 540,100
  669. set object rotation zyx 5
  670. set object rotation zyx 50
  671.  
  672. set object rotation zyx 2
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680. make object plain 200,400,400
  681. xrotate object 200,90
  682. yrotate object 200,rnd(360)
  683. fix object pivot 200
  684.  
  685. load object "lev1/atmos.3ds",201
  686.  
  687. set object 201,1,1,1,0,0,0,1
  688.  
  689.  
  690.  
  691. ghost object on 200
  692. color object 200,0
  693. ghost object on 201
  694. load image "decals/hole.bmp",666
  695.  
  696. for f=250 to 259:make object plain f,200,200:next f
  697. for f=260 to 280:make object plain f,20,20:texture object f,666
  698. set object f,1,rgb(0,0,0),0,1
  699. zrotate object f,rnd(360)
  700. fix object pivot f
  701. next f
  702. for f=250 to 256
  703. set object f,1,0,0,0,0,1,0
  704. set object rotation zyx f
  705. ghost object on f
  706. next f
  707.  
  708.  
  709. set object rotation zyx 200
  710. set object rotation zyx 540
  711.  
  712. hide object 540
  713.  
  714. rem load lots and lots of textures
  715.  
  716. imgno=999
  717. for f=0 to 9
  718. inc imgno
  719. load image "decals/blood000"+str$(f)+".bmp",imgno
  720. next f
  721. for f=10 to 24
  722. inc imgno
  723. load image "decals/blood00"+str$(f)+".bmp",imgno
  724. next f
  725.  
  726. imgno=1049
  727. for f=0 to 9
  728. inc imgno
  729. load image "decals/sparks000"+str$(f)+".bmp",imgno
  730. next f
  731. for f=10 to 12
  732. inc imgno
  733. load image "decals/sparks00"+str$(f)+".bmp",imgno
  734. next f
  735.  
  736. imgno=1099
  737. for f=0 to 6
  738. inc imgno
  739. load image "decals/shoot000"+str$(f)+".bmp",imgno
  740. next f
  741.  
  742.  
  743. imgno=1199
  744. for f=0 to 9
  745. inc imgno
  746. load image "decals/tele000"+str$(f)+".bmp",imgno
  747. next f
  748. for f=10 to 24
  749. inc imgno
  750. load image "decals/tele00"+str$(f)+".bmp",imgno
  751. next f
  752.  
  753.  
  754. imgno=1299
  755. for f=0 to 9
  756. inc imgno
  757. load image "decals/smoke000"+str$(f)+".bmp",imgno
  758. next f
  759. for f=10 to 12
  760. inc imgno
  761. load image "decals/smoke00"+str$(f)+".bmp",imgno
  762. next f
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777. color object 1,rgb(30,30,30)
  778. ghost object on 1
  779.  
  780.  
  781.  
  782.  
  783. set camera range 10,6000
  784. fog distance 3500
  785. fog on
  786. fog color rgb(0,0,0)
  787. MAIN:
  788. fade object 2,100
  789. set ambient light 10
  790. hide object 999
  791. cr=150
  792.  
  793.  
  794. gosub level1
  795. randomize matrix 1,50
  796. update matrix 1
  797.  
  798. load 3dsound "sounds/wind.wav",1
  799. load 3dsound "sounds/wind.wav",10
  800. load 3dsound "sounds/church.wav",11
  801.  
  802. load sound "sounds/walk.wav",2:set sound volume 2,89
  803. load sound "sounds/walkwoo.wav",12:set sound volume 12,89
  804.  
  805. load sound "sounds/gunauto1.wav",3:set sound volume 3,90
  806. clone sound 4,3
  807. clone sound 6,2:set sound speed 6,30000
  808.  
  809. load sound "sounds/teleport2.wav",5:set sound volume 5,100
  810. load sound "sounds/swish.wav",40
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817. rem ambient sounds
  818. load sound "sounds/howl02.wav",50
  819. load sound "sounds/thunder2.wav",51
  820. load sound "sounds/demon3.wav",52
  821. load sound "sounds/demon2.wav",53
  822. load sound "sounds/demon1.wav",54
  823. load sound "sounds/runaway.wav",55
  824.  
  825. rem false demom
  826. make object sphere 446,1
  827.  
  828.  
  829. delete object 2222
  830. start:
  831. rem *** player start position ***
  832. position object 6,1300,0,6000
  833.  
  834.  
  835. pweap=4
  836. weap=4
  837. hide object 2
  838.  
  839.  
  840. fn=200
  841. tn=1
  842. hide mouse
  843. sync
  844.  
  845. mill=59
  846. sec=59
  847. secs=9
  848. mins=5
  849. hole=259
  850.  
  851. set text size 24
  852. ink rgb(255,10,10),0
  853.  
  854. rem blood
  855.  
  856. if object exist(777)=1 then goto skipmakebloodplain
  857. make object plain 777,300,600
  858. ghost object on 777
  859. set object rotation zyx 777
  860. texture object 777,1000
  861.  
  862. skipmakebloodplain:
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869. REM **************START*************
  870. dim smt(6)
  871. opx=object position x(6)
  872. opy=object position z(6)
  873. opz=object position y(6)
  874. show light 1
  875. walk=20
  876. smp=-1
  877. hide object 444
  878. ez=50
  879. seal=0
  880. hide object 6010:show object 6012:show object 6011
  881. cls
  882.  
  883. do
  884.  
  885.  
  886. rem rotate seal constantly and check for collection
  887. srot=srot+30
  888. if srot=30000 then srot=0
  889. yrotate object 6012,wrapvalue(srot)
  890.  
  891. if seal=1 then hide object 6011:hide object 6012:show object 6010
  892.  
  893. if opx>25500 and opx<26500 and opy>5500 and opy<6500 then seal=1
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902. rem teleport texture
  903.  
  904.  
  905. point object 128,opx,600,opy
  906. fade object 128,50+rnd(50)
  907.  
  908. point object 129,opx,600,opy
  909. fade object 129,50+rnd(50)
  910.  
  911.  
  912.  
  913.  
  914. rem demon stuff
  915. position object 445,ex,ez,ey
  916. position object 446,ex,ez,ey
  917.  
  918. rem demon collision
  919.  
  920.  
  921. state=0
  922. if opx>ex-500 and opx<ex+500 and opy>ey-500 and opy<ey+500 then state=2 
  923. if opx>ex-500 and opx<ex+500 and opy>ey-500 and opy<ey+500 then state=2:fol=0:path=0:if object frame(445)<70 or object frame(445)>100 then set object frame 445,70
  924.  
  925.  
  926.  
  927. if state=0
  928. rem player path 
  929. if path>99 then path=0
  930. if path=99 then fol=1
  931. if sopx<>opx then inc path:goto skippath
  932. if sopy<>opy then inc path
  933. skippath:
  934.  
  935. plpathx(path)=opx
  936. plpathy(path)=opy
  937. plpathz(path)=object position y(6)-(dh+350)
  938.  
  939.  
  940.  
  941. if fol=1 
  942. if flash=0 then flash=1
  943. inc pathf
  944. if pathf>99 then pathf=1
  945. if pathf=1 and sound playing(55)=0 then play sound 55
  946.  
  947.  
  948. ex=plpathx(pathf)
  949. ey=plpathy(pathf)
  950. ez=plpathz(pathf)
  951. if ez<50 then ez=50
  952. walk=walk+2
  953. if walk=40 then play sound 100
  954. if walk>59 then walk=20:play sound 100
  955.  
  956. set object frame 445,walk
  957.  
  958. endif
  959.  
  960. endif
  961.  
  962.  
  963. rem demon appear
  964. if flash>0 then inc flash:texture object 444,444+rnd(8)
  965. if flash=2 then show object 444:position object 444,ex,0,ey
  966. if flash=10 then hide object 444
  967.  
  968.  
  969.  
  970.  
  971.  
  972. rem smooth demon turn
  973. point object 446,opx,0,opy
  974. yrotate object 445,curvevalue(object angle y(446),object angle y(445),5)
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984. gosub checkdemonstate
  985.  
  986. rem demon hits you
  987.  
  988.  
  989. if object frame(445)>85 and object frame(445)<91 and state=2 then inc pain:set gamma 255,0,0:red=1:if sound playing(102)=0 then play sound 102
  990. if red>0 then inc red
  991. if red=5 then red=0:set gamma 255,255,255
  992. if pain>4 then dead=1
  993.  
  994. if dead=1 then goto deaded:
  995.  
  996.  
  997.  
  998.  
  999.  
  1000. rem flashlight
  1001.  
  1002. set light to object position 0,5
  1003.  
  1004. position light 1,object position x(999),object position y(999),object position z(999)
  1005. point light 1,object position x(1),object position y(1),object position z(1)
  1006.  
  1007. position listener object position x(6),object position y(6),object position z(6)
  1008. rem false camera distance
  1009. position object 333,object position x(6),((object position y(6))+noh)-250,object position z(6)
  1010.  
  1011.  
  1012. rem dateline
  1013.  
  1014. if titlecount<250
  1015.  
  1016. inc titlecount
  1017. if titlecount=1 then for f=6000 to 6006:show object f:next f
  1018. ltitc#=ltitc#+0.5
  1019. ltc=ltitc#
  1020. tit$="1954: Somewhere in the Po valley: Italy:  23:54 pm"
  1021. if titlecount<110 then ntit$=left$(tit$,ltc):if sound playing(6)=0 then play sound 6
  1022. ink 0,0
  1023. text 10,360,ntit$
  1024. ink rgb(255,32,32),0
  1025. if titlecount<110 then ntit$=left$(tit$,ltc)
  1026. text 10,361,ntit$
  1027. if titlecount=50
  1028. show light 1
  1029. show light 2
  1030.  
  1031. endif
  1032.  
  1033.  
  1034.  
  1035. if titlecount=248 then draw to back
  1036. if titlecount=249 then draw to front
  1037. endif
  1038.  
  1039.  
  1040. rem retrievel
  1041. if opx<2000 and seal=1 then goto theend
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047. texture object 6002,60000+(mins)
  1048. texture object 6004,60000+(sec/10)
  1049. texture object 6005,60000+(secs)
  1050. if sec<10 then texture object 6004,60000:texture object 6005,60000+sec
  1051.  
  1052. mill=mill-2
  1053. if mill<0 then dec sec:dec secs:mill=59
  1054. if sec<0 then dec mins:sec=59
  1055. if secs<0 then secs=9
  1056. if mins<0 then goto theend
  1057.  
  1058.  
  1059.  
  1060.  
  1061. set ambient light 10
  1062.  
  1063. rem select weapon
  1064.  
  1065. if scancode()=2 then pweap=1
  1066. if scancode()=5 then pweap=4
  1067.  
  1068. if mouseclick()<>0 then weap=pweap
  1069.  
  1070. if pweap=4 then texture object 6006,60051
  1071. if pweap=1 then texture object 6006,60050
  1072.  
  1073. if weap=4 then hide object 50:show object 5
  1074. if weap=1 then hide object 5:show object 50
  1075.  
  1076.  
  1077. rem weapon 1(stick)
  1078. if weap=1 
  1079. if mouseclick()=1 and object playing(50)=0 and sound playing(40)=0 then play object 50:set sound speed 40,16000:play sound 40
  1080.  
  1081. endif
  1082.  
  1083.  
  1084.  
  1085. rem weapon 4(ak47)
  1086. if weap=4
  1087. if mouseclick()=0 then shf=0:hide object 200
  1088. if mouseclick()=1 and shoot=0 then shoot=1: play object 5:sfn=1 else hide object 2
  1089.  
  1090. if mouseclick()=1
  1091. idle=0
  1092. inc shf
  1093. if shf=6 then shf=0
  1094. if shf=1 
  1095. show object 2: play sound 3:inc hole:inc shole:if hole>280 then hole=260
  1096. set ambient light 33
  1097. endif
  1098. if shole>1999 then shole=999
  1099.  
  1100.  
  1101.  
  1102.  
  1103. goto skipwep4
  1104.  
  1105. endif
  1106.  
  1107. endif
  1108.  
  1109. if weap=4
  1110. if mouseclick()=0 then shf=0
  1111. if mouseclick()=2 and shoot=0 then shoot=1: play object 5:sfn=1 else hide object 2
  1112. if mouseclick()=2
  1113. idle=0
  1114. inc shf
  1115. if shf>3 then shf=0
  1116. if shf=1 
  1117. show object 2: play sound 3:inc hole:if hole>280 then hole=260
  1118. set ambient light 33
  1119. endif
  1120.  
  1121. endif
  1122. endif
  1123.  
  1124. skipwep4:
  1125.  
  1126. inc idle
  1127. rem sounds n stuff
  1128.  
  1129. if object position x(6)>11500 then position sound 11,opx,object position y(6),opy
  1130.  
  1131. if object position x(6)<11501
  1132. position sound 10,opx,200,opy
  1133. position sound 1,opx,200,opy
  1134. if amso=1 then play sound 50
  1135. if amso=2 then play sound 51:fog color rgb(255,255,255):set ambient light 100:sync:fog color rgb(0,0,0):set ambient light 10
  1136. endif
  1137. rotate listener 0,object angle y(6),0
  1138. if sound playing(1)=0 then play sound 1
  1139. if sound playing(11)=0 then play sound 11
  1140. if sound playing(10)=0 and titlecount>125 then play sound 10
  1141.  
  1142. amso=rnd(1500)
  1143.  
  1144. if amso=3 then play sound 52
  1145. if amso=4 then play sound 53
  1146. if amso=5 then play sound 54
  1147.  
  1148.  
  1149. if cr<150 then cr=cr+10
  1150. if scancode()=0 then dec sp
  1151. if scancode()=82 then cr=0
  1152.  
  1153.  
  1154.  
  1155. if sp<0 then sp=0
  1156.  
  1157. if cr>100 then if sp>0 then sp=2
  1158. if cr<101 then if sp>0 then sp=1
  1159.  
  1160.  
  1161. gosub chekrange
  1162.  
  1163. if repel=1 then repel=0:goto sopskip
  1164. sopx=object position x(6)
  1165. sopy=object position z(6)
  1166. sopz=object position y(6)
  1167.  
  1168. sopskip:
  1169.  
  1170. gosub chekrange
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. if dead=1 then gosub skipmov
  1180.  
  1181. if upkey()=1 or downkey()=1 or leftkey()=1 or rightkey()=1 then sp=48:gosub bobtest:gosub bobtest
  1182.  
  1183. if upkey()=1 and downkey()=1 then goto skipup
  1184. if leftkey()=1 and rightkey()=1 then goto skipstrafe
  1185.  
  1186.  
  1187. if upkey()=1
  1188. move object 6,sp
  1189.  
  1190.  
  1191. endif
  1192.  
  1193.  
  1194.  
  1195.  
  1196. if downkey()=1
  1197. move object 6,0-sp
  1198.  
  1199.  
  1200. endif
  1201.  
  1202. skipup:
  1203.  
  1204. if leftkey()=1
  1205. yrotate object 6,wrapvalue(rot+90)
  1206. move object 6,0-sp
  1207. yrotate object 6,wrapvalue(rot-90)
  1208.  
  1209.  
  1210.  
  1211. endif
  1212.  
  1213.  
  1214. if rightkey()=1
  1215. yrotate object 6,wrapvalue(rot-90)
  1216. move object 6,0-sp
  1217. yrotate object 6,wrapvalue(rot+90)
  1218.  
  1219.  
  1220. endif
  1221. skipstrafe:
  1222.  
  1223.  
  1224.  
  1225. if scancode()=79 and oh<=gh
  1226. jump=50
  1227. endif
  1228.  
  1229.  
  1230.  
  1231.  
  1232. oh=oh+jump:jump=jump-8
  1233.  
  1234.  
  1235. gh=(get ground height(1,object position x(5),object position z(5)))+(100+cr)
  1236.  
  1237.  
  1238. if oh<gh then oh=gh:jump=0
  1239.  
  1240. if oh>100+(gh) and oh<100+(gh+16) and opx<11600 then play sound 2
  1241. if oh>100+(gh) and oh<100+(gh+16) and opx>11599 then play sound 12
  1242.  
  1243.  
  1244. rem *** object collision ***
  1245. skipmov:
  1246. opx=object position x(6)
  1247. opy=object position z(6)
  1248. opz=object position y(6)
  1249. nopx=opx
  1250. nopy=opy
  1251.  
  1252. gosub chekrange
  1253. if repel=1 then opx=sopx:repel=0
  1254. gosub chekrange
  1255. if repel=1 then opy=sopy:opx=nopx
  1256. repel=0
  1257.  
  1258. gosub chekrange
  1259. if repel=1 then opx=sopx:repel=0
  1260. gosub chekrange
  1261. if repel=1 then opy=sopy:opx=nopx
  1262. repel=0
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275. pah=pah+mousemovey()*4
  1276. if pah<-1000 then pah=-1000
  1277. if pah>1000+noh then pah=1000+noh
  1278. rot=rot+mousemovex()/4
  1279.  
  1280. position object 1,object position x(5),pah,object position z(5)
  1281. yrotate object 1,wrapvalue(rot):yrotate object 6,wrapvalue(rot)
  1282. move object 1,1000
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288. if fn>209 then fn=200
  1289.  
  1290.  
  1291. if shoot=1 and shf=1 then fu=0:fs=0:fe=0:gosub chekshotwall
  1292.  
  1293.  
  1294. if fu=1 then fs=0:fe=0
  1295.  
  1296. if fs=1 then fu=0:fe=0
  1297.  
  1298. if fe=1 then fs=0:fu=0
  1299.  
  1300.  
  1301.  
  1302. if shoot=1 and fu=1 and shf=1
  1303. position object hole,object position x(200),object position y(200),object position z(200)
  1304. point object hole,object position x(540),100000,object position z(540)
  1305.  
  1306. rotate object 200,rnd(360),rnd(360),rnd(360)
  1307.  
  1308. endif
  1309.  
  1310. if shoot=1 and fs=1 and shf=1
  1311. position object hole,object position x(200),object position y(200),object position z(200)
  1312. point object hole,0,0,100000
  1313. rotate object 200,rnd(360),rnd(360),rnd(360)
  1314.  
  1315. endif
  1316.  
  1317. if shoot=1 and fe=1 and shf=1
  1318. position object hole,object position x(200),object position y(200),object position z(200)
  1319. point object hole,100000,0,0
  1320. rotate object 200,rnd(360),rnd(360),rnd(360)
  1321.  
  1322. endif
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328. rem **********SMOKE************
  1329. if idle>50 then goto skipsmokeifidle
  1330.  
  1331. if hole>ohole
  1332. inc smp
  1333. if smp=1 then smt(1)=1:show object 250:yrotate object 250,rnd(360)
  1334. if smp=2 then smt(2)=1:show object 251:yrotate object 251,rnd(360)
  1335. if smp=3 then smt(3)=1:show object 252:yrotate object 252,rnd(360)
  1336. if smp=4 then smt(4)=1:show object 253:yrotate object 253,rnd(360)
  1337. if smp=5 then smt(5)=1:show object 254:yrotate object 254,rnd(360)
  1338. if smp=6 then smt(6)=1:show object 255:yrotate object 255,rnd(360)
  1339. if smp>6 then smp=1
  1340. endif
  1341.  
  1342.  
  1343. if smt(1)>0 then smt(1)=smt(1)+1
  1344. if smt(2)>0 then smt(2)=smt(2)+1
  1345. if smt(3)>0 then smt(3)=smt(3)+1
  1346. if smt(4)>0 then smt(4)=smt(4)+1
  1347. if smt(5)>0 then smt(5)=smt(5)+1
  1348. if smt(6)>0 then smt(6)=smt(6)+1
  1349.  
  1350. if smt(1)>12 then smt(1)=0:hide object 250
  1351. if smt(2)>12 then smt(2)=0:hide object 251
  1352. if smt(3)>12 then smt(3)=0:hide object 252
  1353. if smt(4)>12 then smt(4)=0:hide object 253
  1354. if smt(5)>12 then smt(5)=0:hide object 254
  1355. if smt(6)>12 then smt(6)=0:hide object 255
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361. if smt(1)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1362. if smt(2)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1363. if smt(3)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1364. if smt(4)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1365. if smt(5)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1366. if smt(6)=2 then position object 249+smp,object position x(200),object position y(200),object position z(200)
  1367.  
  1368.  
  1369. for f=1 to 6
  1370. point object 249+f,0,100000,0:move object 249+f,30
  1371. point object 249+f,object position x(5),object position y(5),object position z(5)
  1372. move object 249+f,30
  1373. texture object 249+f,1300+smt(f)
  1374. next f
  1375.  
  1376. ohole=hole
  1377. skipsmokeifidle:
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383. rem blood splatter
  1384. if blood>998 then inc blood
  1385. if blood>1024 then blood=998
  1386. if blood>999 then texture object 777,blood
  1387. if replace=2 then fol=0:path=0:flash=1
  1388. if replace>1 and blood=1024 then ex=35000:replace=0:pathf=0:flash=0:position object 777,30000,0,0:hide object 444
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413. if tn>12 then tn=1+rnd(2):shoot=0
  1414. texture object 200,1049+tn
  1415. tn=tn+2
  1416. texture object 2,1099+(1+rnd(6))
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423. ranged:
  1424.  
  1425.  
  1426.  
  1427.  
  1428. position object 6,opx,100+oh+bobber+noh+def,opy
  1429.  
  1430.  
  1431.  point object 5,object position x(1),pah,object position z(1)
  1432.  position object 5,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6)
  1433.  
  1434.  
  1435.  point object 50,object position x(1),pah,object position z(1)
  1436.  position object 50,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6)
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  point object 2,object position x(1),pah,object position z(1)
  1442.  
  1443.  position object 2,object position x(6),object position y(6)+bobber+(brs#*10),object position z(6)
  1444.  
  1445.  
  1446. if count<25
  1447.  
  1448. inc count
  1449. if count=1 then play sound 5
  1450.  
  1451. texture object 201,1199+count
  1452. position object 201,object position x(5),200,object position z(5)
  1453.  
  1454. endif
  1455. if count=25 then hide object 201
  1456.  
  1457.  
  1458. breath=breath+4
  1459. brs#=cos(breath)
  1460. if breath>360 then breath=0
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466. position object 999,object position x(5),object position y(5),object position z(5)
  1467. point object 999,object position x(1),pah,object position z(1)
  1468. xrotate object 999,wrapvalue(object angle x(999)-90)
  1469. move object 999,90+(bobber/2):xrotate object 999,wrapvalue(object angle x(999)+90)
  1470. move object 999,10
  1471.  
  1472.  
  1473.  position camera object position x(999),object position y(999),object position z(999)
  1474. if seal=0 then point camera object position x(1),pah+bobber,object position z(1)
  1475. if seal=1 then point camera object position x(1)+rnd(100),pah+bobber+rnd(100),object position z(1)+rnd(100)
  1476.  
  1477. rem position camera object position x(5),1000,object position z(5)
  1478. rem point camera object position x(5),0,object position z(5)
  1479.  
  1480.  
  1481.  
  1482.  
  1483. rem additions
  1484. gosub activatevideo
  1485.  
  1486.  
  1487. sync
  1488. loop
  1489.  
  1490.  
  1491.  
  1492. bobtest:
  1493.  
  1494. if seal=1 then sp=24
  1495.  
  1496.  
  1497. if upkey()=1 and downkey()=1 then return
  1498. if leftkey()=1 and rightkey()=1 then return
  1499. if jump<>0 then return
  1500. inc bobbin
  1501.  
  1502. if opx<11700
  1503. if bobbin=19 or bobbin=9 then set sound speed 2,10500-rnd(200):play sound 2
  1504. endif
  1505. if opx>11699
  1506. if bobbin=19 or bobbin=9 then set sound speed 12,10500-rnd(200):play sound 12
  1507. endif
  1508.  
  1509. if bobbin<10 then inc bobber
  1510. if bobbin>9 then dec bobber
  1511. if bobbin>19 then bobbin=0:bobber=0
  1512.  
  1513. return
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538. level1:
  1539.  
  1540.  
  1541.  
  1542. rem --------------------------------------- SET VARIABLES
  1543.  
  1544. matrix_x = 25000
  1545. matrix_z = 25000
  1546. matrix_y = 500
  1547.  
  1548. rem fog distance matrix_z*1.5
  1549.  
  1550. tile_count_x = 20
  1551. tile_count_z = 20
  1552. tile_count = tile_count_x * tile_count_z
  1553.  
  1554. rem dim tile_number_image(6000)
  1555. tile_image = 1
  1556.  
  1557. rem --------------------------------------- LOAD 10 BMPs and Images
  1558.  
  1559. for t = 1 to 10
  1560.    load bitmap "paths/"+str$(t)+".bmp",1
  1561.    get image t,0,0,256,256
  1562. next t
  1563.  
  1564. rem --------------------------------------- Make Matrix-image
  1565.  
  1566. create bitmap 1,2560,256
  1567.  
  1568. x_image = 0
  1569.  
  1570. for t = 1 to 10
  1571.    paste image t,x_image,0
  1572.    inc x_image,256
  1573. next t
  1574.  
  1575. get image 11,0,0,2560,256
  1576.  
  1577. delete bitmap 1
  1578.  
  1579. rem --------------------------------------- LOAD MAP
  1580.  
  1581. open to read 1,"sys/level.mmf"
  1582.  
  1583. read string 1,a$ : matrix_x = val(a$)
  1584. read string 1,a$ : matrix_z = val(a$)
  1585. read string 1,a$ : tile_count_x = val(a$)
  1586. read string 1,a$ : tile_count_z = val(a$)
  1587.  
  1588. read string 1,a$ :
  1589. read string 1,a$ :
  1590.  
  1591.  
  1592. read string 1,a$ :
  1593. read string 1,a$ :
  1594. read string 1,a$ :
  1595. read string 1,a$ :
  1596. read string 1,a$ :
  1597.  
  1598. make matrix 1, 12000, 12000, tile_count_x, tile_count_z
  1599. prepare matrix texture 1,11,10,1
  1600.  
  1601. tile_x = 0
  1602. tile_z = 0
  1603. tile_number = 0
  1604.  
  1605. for a = 0 to tile_count_z
  1606.  
  1607.    for t = 0 to tile_count_x
  1608.       read string 1,a$
  1609.       set matrix height 1, tile_x, tile_z,val(a$)
  1610.       inc tile_x,1
  1611.    next t
  1612.  
  1613.    inc tile_z,1
  1614.    tile_x = 0
  1615.  
  1616. next a
  1617.  
  1618. tile_x = 0
  1619. tile_z = 0
  1620. tile_tmp = 0
  1621.  
  1622. for t = 0 to tile_count_z-1
  1623.    for a = 0 to tile_count_x-1
  1624.       read string 1,a$
  1625.       set matrix tile 1, tile_x, tile_z, val(a$)
  1626.       inc tile_x
  1627.    next a
  1628.    tile_x = 0
  1629.    inc tile_z
  1630. next t
  1631.  
  1632.  
  1633. close file 1
  1634. return
  1635.  
  1636.  
  1637.  
  1638.  
  1639. return
  1640.  
  1641. chekshotwall:
  1642. position object 540,object position x(5),oh+150+noh,object position z(5)
  1643. point object 540,object position x(1),pah,object position z(1)
  1644.  
  1645. oropx=object position x(540)
  1646. oropy=object position z(540)
  1647. oropz=object position y(540)
  1648.  
  1649. for f=1 to 800:
  1650.  
  1651.  
  1652.  
  1653. move object 540,8
  1654.  
  1655. rem ****collisions***
  1656.  
  1657. ropx=object position x(540)
  1658. ropy=object position z(540)
  1659. ropz=object position y(540)
  1660. oropx=object position x(540)
  1661. oropy=object position z(540)
  1662. oropz=object position y(540)
  1663.  
  1664.  
  1665. if ropz<0 then fu=1:goto skipchek
  1666. if ropx<710 and ropy>650 and ropy<4500 then fe=1: goto pit
  1667. if ropx<710 and ropy>7500 and ropy<11480 then fe=1: goto pit
  1668. if ropy>11420 and ropx>650 and ropx<11480 then fs=1:goto pit
  1669. if ropy<650 and ropx>650 and ropx<11480 then fs=1:goto pit
  1670. if ropx>11450 and ropx<11580 and ropy>6900 and ropy<11480 then fe=1: goto pit
  1671. if ropx>11450 and ropx<11580 and ropy>600 and ropy<5100 then fe=1: goto pit
  1672. if ropx>11230 and ropx<11580 and ropy>6300 and ropy<6950 then fe=1: goto pit
  1673. if ropx>11230 and ropx<11580 and ropy>5050 and ropy<5700 then fe=1: goto pit
  1674. if ropx>11230 and ropx<11580 and ropy>5700 and ropy<6300 and object position y(540)>800 then fe=1: goto pit
  1675.  
  1676. rem check demon pos
  1677. if ropx>ex-125 and ropx<ex+125 and ropy>ey-125 and ropy<ey+125 and ropz<1200 
  1678. position object 777,ropx,ropz+50,ropy
  1679. point object 777,opx,0,opy:move object 777,150
  1680. if blood<999 then blood=999:inc replace
  1681.  
  1682. goto pit
  1683. endif
  1684.  
  1685.  
  1686.  
  1687. if ropx>11390 and ropx<11580 and ropy>7030 and ropy<7200 then fe=1: goto pit
  1688. if ropx>11390 and ropx<11580 and ropy>9250 and ropy<9380 then fe=1: goto pit
  1689. if ropx>11390 and ropx<11580 and ropy>4820 and ropy<4950 then fe=1: goto pit
  1690. if ropx>11390 and ropx<11580 and ropy>2550 and ropy<2700 then fe=1: goto pit
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696. if ropx>8475 and ropx<8760 and ropy>4500 and ropy<4770 and ropz<720
  1697. chag1=0
  1698. rotate object 540,0,0,0
  1699. chekagain1:
  1700. inc chag1
  1701. position object 540,oropx,oropz,oropy
  1702. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1703. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1704. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1705. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1706. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1707. ropx=object position x(540)
  1708. ropy=object position z(540)
  1709. ropz=object position y(540)
  1710. position object 540,oropx,oropz,oropy
  1711. if ropx>8475 and ropx<8760 and ropy>4500 and ropy<4770 then goto chekagain1
  1712. goto pit
  1713. endif
  1714.  
  1715. if ropx>8475 and ropx<8780 and ropy>6810 and ropy<7110 and ropz<720
  1716. chag1=0
  1717. rotate object 540,0,0,0
  1718. chekagain2:
  1719. inc chag1
  1720. position object 540,oropx,oropz,oropy
  1721. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1722. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1723. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1724. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1725. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1726. ropx=object position x(540)
  1727. ropy=object position z(540)
  1728. ropz=object position y(540)
  1729. position object 540,oropx,oropz,oropy
  1730. if ropx>8475 and ropx<8780 and ropy>6810 and ropy<7110 then goto chekagain2
  1731. goto pit
  1732. endif
  1733.  
  1734. if ropx>5220 and ropx<7320 and ropy>10470 
  1735. chag1=0
  1736. rotate object 540,0,0,0
  1737. chekagain3:
  1738. inc chag1
  1739. position object 540,oropx,oropz,oropy
  1740. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1741. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1742. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1743. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1744. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1745. ropx=object position x(540)
  1746. ropy=object position z(540)
  1747. ropz=object position y(540)
  1748. position object 540,oropx,oropz,oropy
  1749. if ropx>5220 and ropx<7320 and ropy>10470  then goto chekagain3
  1750. goto pit
  1751. endif
  1752.  
  1753.  
  1754.  
  1755. rem left tree
  1756. if ropx>4413 and ropx<4580 and ropy>8345 and ropy<8454
  1757. chag1=0
  1758. rotate object 540,0,0,0
  1759. chekagain4:
  1760. inc chag1
  1761. position object 540,oropx,oropz,oropy
  1762. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1763. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1764. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1765. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1766. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1767. ropx=object position x(540)
  1768. ropy=object position z(540)
  1769. ropz=object position y(540)
  1770. position object 540,oropx,oropz,oropy
  1771. if ropx>4413 and ropx<4580 and ropy>8345 and ropy<8454 then goto chekagain4
  1772. goto pit
  1773. endif
  1774.  
  1775.  
  1776.  
  1777.  
  1778. rem right tree
  1779. if ropx>4413 and ropx<4580 and ropy>3950 and ropy<4160
  1780. chag1=0
  1781. rotate object 540,0,0,0
  1782. chekagain5:
  1783. inc chag1
  1784. position object 540,oropx,oropz,oropy
  1785. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1786. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1787. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1788. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1789. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1790. ropx=object position x(540)
  1791. ropy=object position z(540)
  1792. ropz=object position y(540)
  1793. position object 540,oropx,oropz,oropy
  1794. if ropx>4413 and ropx<4580 and ropy>3950 and ropy<4160 then goto chekagain5
  1795. goto pit
  1796. endif
  1797.  
  1798.  
  1799.  
  1800. rem nearest spire
  1801. if ropx>0 and ropx<1840 and ropy>1072 and ropy<2920
  1802. chag1=0
  1803. rotate object 540,0,0,0
  1804. chekagain6:
  1805. inc chag1
  1806. position object 540,oropx,oropz,oropy
  1807. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1808. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1809. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1810. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1811. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1812. ropx=object position x(540)
  1813. ropy=object position z(540)
  1814. ropz=object position y(540)
  1815. position object 540,oropx,oropz,oropy
  1816. if ropx>0 and ropx<1840 and ropy>1072 and ropy<2920 then goto chekagain6
  1817. goto pit
  1818. endif
  1819.  
  1820.  
  1821.  
  1822. rem rpillar
  1823. if ropx>0 and ropx<1034 and ropy>4430 and ropy<4797
  1824. chag1=0
  1825. rotate object 540,0,0,0
  1826. chekagain7:
  1827. inc chag1
  1828. position object 540,oropx,oropz,oropy
  1829. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1830. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1831. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1832. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1833. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1834. ropx=object position x(540)
  1835. ropy=object position z(540)
  1836. ropz=object position y(540)
  1837. position object 540,oropx,oropz,oropy
  1838. if ropx>0 and ropx<1034 and ropy>4430 and ropy<4797 then goto chekagain7
  1839. goto pit
  1840. endif
  1841.  
  1842. rem lpillar
  1843. if ropx>0 and ropx<1034 and ropy>7250 and ropy<7650
  1844. chag1=0
  1845. rotate object 540,0,0,0
  1846. chekagain8:
  1847. inc chag1
  1848. position object 540,oropx,oropz,oropy
  1849. if chag1=1 then yrotate object 540,0:move object 540,12:fs=1
  1850. if chag1=2 then yrotate object 540,90:move object 540,12:fe=1:fs=0
  1851. if chag1=3 then yrotate object 540,180:move object 540,12:fs=1:fe=0
  1852. if chag1=4 then yrotate object 540,270:move object 540,12:fe=1:fs=0
  1853. if chag=5 then position object 540,oropx,oropz,oropy:goto pit
  1854. ropx=object position x(540)
  1855. ropy=object position z(540)
  1856. ropz=object position y(540)
  1857. position object 540,oropx,oropz,oropy
  1858. if ropx>0 and ropx<1034 and ropy>7250 and ropy<7650 then goto chekagain8
  1859. goto pit
  1860. endif
  1861.  
  1862. rem hedges
  1863. if ropx>900 and ropx<6750 and ropy>8500 and ropy<9100 and ropz<500 then goto pit
  1864. if ropx>6200 and ropx<7800 and ropy>7850 and ropy<9550 and ropz<500 then goto pit
  1865. if ropx<6500 and ropy>3250 and ropy<3900 and ropz<500 then goto pit
  1866. if ropx>6000 and ropx<8000 and ropy>2700 and ropy<4500 and ropz<500 then goto pit
  1867.  
  1868.  
  1869.  
  1870. next f
  1871. position object 200,object position x(540),object position y(540),object position z(540):goto skipskipchek
  1872.  
  1873. return
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884. pit:
  1885. position object 200,object position x(540),object position y(540),object position z(540):goto skipskipchek
  1886.  
  1887.  
  1888. skipchek:
  1889.  
  1890.  
  1891.  
  1892. position object 200,object position x(540),get ground height(1,object position x(540),object position z(540))+3,object position z(540)
  1893. skipskipchek:
  1894.  
  1895. show object 200
  1896. smoke=1
  1897.  
  1898.  
  1899.  
  1900.  
  1901. return
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921. chekrange:
  1922.  
  1923.  
  1924.  
  1925.  
  1926. if opx<900 then repel=1
  1927.  if opx<11500 and opy>11150 then repel=1
  1928. if opy<900 and opx<11500 then repel=1
  1929.  
  1930. if opx<900 and opy>11150 then repel=1
  1931.  
  1932.  
  1933.  
  1934. if opx<1300 and opy>4200 and opy<7800 then repel=1
  1935. if opx<1300 and opy>4200 and opy<7800 then repel=1
  1936.  
  1937. if opx<2000 and opy>900 and opy<3100 then repel=1
  1938.  
  1939. if opx<6500 and opy>3250 and opy<3900 then repel=1
  1940.  
  1941. if opx>6100 and opx<7900 and opy>2750 and opy<4500 then repel=1
  1942.  
  1943. rem left hedge
  1944. if opx>900 and opx<6750 and opy>8500 and opy<9100 then repel=1
  1945.  
  1946. if opx>6200 and opx<7800 and opy>7850 and opy<9550 then repel=1
  1947.  
  1948. if opx>5000 and opx<7500 and opy>10313 and opy<12000 then repel=1
  1949.  
  1950. rem posts
  1951. if opx>8330 and opx<8930 and opy>6670 and opy<7240 then repel=1
  1952. if opx>8330 and opx<8930 and opy>4300 and opy<4930 then repel=1
  1953.  
  1954. rem church
  1955. if opx>11130 and opx<12000 and opy>700 and opy<4950 then repel=1
  1956. if opx>11130 and opx<12000 and opy>7000 and opy<12000 then repel=1
  1957. if opx>11000 and opx<12000 and opy>4800 and opy<5850 then repel=1
  1958. if opx>11000 and opx<12000 and opy>6100 and opy<7100 then repel=1
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964. rem back bushes
  1965. if opx>700 and opx<1200 and opy>7500 and opy<12000 then repel=1
  1966. if opx>700 and opx<1000 and opy>700 and opy<4500 then repel=1
  1967.  
  1968.  
  1969. rem trees
  1970.  
  1971. if opx>4180 and opx<4780 and opy>3900 and opy<4280 then repel=1
  1972. if opx>4250 and opx<4750 and opy>8180 and opy<8600 then repel=1
  1973.  
  1974. rem *to be added to bullet hole collision testing*
  1975. rem left church room
  1976. if opx>11700 and opx<17650 and opy<5450 then repel=1
  1977.  
  1978. rem right room
  1979. if opx>11700 and opx<16100 and opy>6450 and opy<6950 then repel=1
  1980. if opx>16800 and opx<17650 and opy>6450 and opy<6950 then repel=1
  1981.  
  1982.  
  1983. if opx>15900 and opx<16400 and opy>6350 and opy<7050 then repel=1
  1984. if opx>16500 and opx<17000 and opy>6350 and opy<7050 then repel=1
  1985.  
  1986. if opx>15900 and opx<16400 and opy>4650 and opy<5550 then repel=1
  1987. if opx>16500 and opx<17000 and opy>4650 and opy<5550 then repel=1
  1988.  
  1989. rem therefore door way is 16400-16500 6450-6550
  1990.  
  1991.  
  1992. if opx>17150 and opx<17650 and opy>6450 and opy<12000 then repel=1
  1993.  
  1994.  
  1995.  
  1996.  
  1997. if opx>17599 and opx<18171 and opy>0 and opy<952 then repel=1
  1998.  
  1999. if opy<287 then repel=1
  2000.  
  2001. if opx>18292 and opx<18989 and opy>1077 and opy<10947 then repel=1
  2002.  
  2003. if opx>17600 and opx<18101 and opy>10990 and opy<11500 then repel=1
  2004.  
  2005. if opy>11370 then repel=1
  2006.  
  2007.  
  2008.  
  2009. if opx>20495 and opx<21904 and opy>9916 and opy<11200 then repel=1
  2010. if opx>23076 and opx<24461 and opy>9916 and opy<11200 then repel=1
  2011. if opx>25824 and opx<27060 and opy>9916 and opy<11200 then repel=1
  2012.  
  2013. if opx>20495 and opx<21904 and opy>686 and opy<2120 then repel=1
  2014. if opx>23076 and opx<24461 and opy>686 and opy<2120 then repel=1
  2015. if opx>25824 and opx<27060 and opy>686 and opy<2120 then repel=1
  2016.  
  2017. if opx>27659 and opx<28200 and opy>0 and opy<816 then repel=1
  2018.  
  2019. if opx>27639 and opx<28200 and opy>10856 and opy<12000 then repel=1
  2020.  
  2021.  
  2022. if opx>28100 and opy>9408 then repel=1
  2023. if opx>28100 and opy<9208 and opy>3355 then repel=1
  2024. if opx>28100 and opy<3155 then repel=1
  2025. if opx>29800 then repel=1
  2026.  
  2027. rem Demon collision
  2028.  
  2029. if opx>ex-300 and opx<ex+300 and opy>ey-300 and opy<ey+300 then repel=1
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047. rem alta+height
  2048.  
  2049. nnoh=0
  2050. if opx>25100 and opx<30000 and opy>2950 and opy<9200 then nnoh=200:
  2051. if opx>25600 and opx<29500 and opy>3500 and opy<8600 then nnoh=400
  2052.  
  2053. if opx>25700 and opx<26700 and opy>4850 and opy<7200 then nnoh=1200
  2054.  
  2055.  
  2056.  
  2057.  
  2058. rem pews
  2059.  
  2060. if opx>19300 and opx<24260 and opy>1850 and opy<10200
  2061.  
  2062.  
  2063. for f=19300 to 24260 step 540
  2064. if opx>f-100 and opx<f+150 and opy>1850 and opy<3850 then nnoh=300
  2065. if opx>f-150 and opx<f-50 and opy>1850 and opy<3850 then nnoh=500
  2066. next f
  2067.  
  2068. for f=19300 to 24260 step 540
  2069. if opx>f-100 and opx<f+150 and opy>4750 and opy<7000 then nnoh=300
  2070. if opx>f-150 and opx<f-50 and opy>4750 and opy<7000 then nnoh=500
  2071. next f
  2072.  
  2073. for f=19300 to 24260 step 540
  2074. if opx>f-100 and opx<f+150 and opy>7950 and opy<10200 then nnoh=300
  2075. if opx>f-150 and opx<f-50 and opy>7950 and opy<10200 then nnoh=500
  2076. next f
  2077.  
  2078. endif
  2079.  
  2080.  
  2081. rem virgers room
  2082.  
  2083. rem table
  2084.  
  2085. if opx>13844 and opx<14352 and opy>7118 and opy<8137 then nnoh=500
  2086.  
  2087. dh=nnoh/2
  2088.  
  2089. if opx>16755 and opx<17000 and opy>7000 and opy<9000 then repel=1
  2090. if opx>16098 and opx<17000 and opy>8474 and opy<9000 then repel=1
  2091.  
  2092. if opx>14363 and opx<15745 and opy>8466 and opy<9000 then repel=1
  2093. if opx>13644 and opx<16900 and opy>8621 and opy<9000 then repel=1
  2094. if opx>12726 and opx<13726 and opy>6950 and opy<8776 then repel=1
  2095.  
  2096.  
  2097.  
  2098. if jump=0 then noh=curvevalue(nnoh,noh,10)
  2099.  
  2100.  
  2101.  
  2102. skipcol:
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110. return
  2111.  
  2112.  
  2113. activatevideo:
  2114.  
  2115. inc vidcount
  2116. if vidcount>50 and vidcount<150 then vsp#=curvevalue(24,vsp#,5)
  2117. position object 6100,vsp#,17,40
  2118. if vidcount>99 and vidcount<110 then texture object 6100,60100+(vidcount-100)
  2119. if vidcount=110 then show object 6101:play sound 104
  2120. texture object 6101,60200+rnd(9)
  2121. if sound playing(104)=1 and vidcount>499 then vidcount=499
  2122. if vidcount>521 then vsp#=curvevalue(40,vsp#,5)
  2123.  
  2124. if vidcount=500 then hide object 6101
  2125. if vidcount=501 then texture object 6100,60109
  2126. if vidcount=503 then texture object 6100,60108
  2127. if vidcount=505 then texture object 6100,60107
  2128. if vidcount=507 then texture object 6100,60106
  2129. if vidcount=509 then texture object 6100,60105
  2130. if vidcount=511 then texture object 6100,60104
  2131. if vidcount=513 then texture object 6100,60103
  2132. if vidcount=515 then texture object 6100,60102
  2133. if vidcount=517 then texture object 6100,60101
  2134. if vidcount=519 then texture object 6100,60100
  2135.  
  2136.  
  2137. return
  2138.  
  2139.  
  2140. checkdemonstate:
  2141.  
  2142. rem stand
  2143.  
  2144.  
  2145. rem if state=0 
  2146.  
  2147. rem inc stcount
  2148. rem stand=stcount
  2149. rem if stcount>10 then stand=10-(stcount-10)
  2150. rem if stand<1 then stcount=0
  2151. rem set object frame (445),stand
  2152.  
  2153.  
  2154. rem endif
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165. rem attack
  2166. if state=2 
  2167.  
  2168. if object frame(445)=70 then play object 445,70,100
  2169. if object frame(445)>76 and object frame(445)<77 then set sound speed 40,11000:play sound 40
  2170. if object frame(445)=100 then set object frame 445,70
  2171.  
  2172. endif
  2173.  
  2174. rem hit
  2175.  
  2176. if blood=1000
  2177. play object 445,100,130
  2178.  
  2179. if opx>ex then ex=ex-24
  2180. if opx<ex then ex=ex+24
  2181. if opy>ey then ey=ey-24
  2182. if opy<ey then ey=ey+24
  2183.  
  2184.  
  2185.  
  2186. endif
  2187.  
  2188.  
  2189. return
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196. rem die
  2197. deaded:
  2198. stop sound 104
  2199. do
  2200. inc ded
  2201. pitch camera up 32/ded
  2202. if ded=2 then play sound 101:stop sound 102
  2203.  
  2204. set gamma 255-ded,0,0
  2205. REM RESET ALL VARIABLES
  2206.  
  2207. if ded>254
  2208.  
  2209. dead=0:set gamma 255,255,255
  2210.  
  2211. red=0
  2212. pain=0
  2213. ded=0
  2214. count=0
  2215. vidcount=0
  2216. titlecount=0
  2217. ltitc#=0
  2218. ltc=0
  2219. vsp#=44
  2220. path=0
  2221. hide object 6101
  2222.  
  2223. goto start:
  2224.  
  2225. endif
  2226. loop
  2227. return
  2228.  
  2229. theend:
  2230. delete sound 1
  2231. for f=1 to 65535:if object exist(f)=1 then delete object f
  2232. next f
  2233. delete static objects
  2234.  
  2235.  
  2236. load sound "sounds/theend.wav",1
  2237. play sound 1
  2238.  
  2239. hide mouse
  2240.  
  2241. load bitmap "sys/theend.bmp"
  2242.  
  2243.  
  2244. sync
  2245.  
  2246. do
  2247. if mouseclick()=1 then break
  2248. loop
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.